<?php echo $this->render('_rootline') ?>

<h1><?php echo $this->topic->subject ?></h1>

<?php echo $this->render('_paginator') ?>

<table border="0" class="topic">
    <tr class="heading">
        <td class="col1"><?php echo $helper->translate('Autor') ?></td>
        <td class="col2"><?php echo $helper->translate('Nachricht') ?></td>
    </tr>
    <?php foreach($this->posts AS $post): ?>
    <tr class="subheading">
        <td colspan="2"><?php echo $helper->translate('Verfasst am') ?> <?php echo $helper->datetime($post->crdate) ?></td>
    </tr>
    <tr>
        <td class="col1">
            <?php echo $helper->profileLink($post->user_id, $post->author) ?><br />
            <?php if($avatar = $post->getAvatarPath()): ?>
                <?php echo $helper->profileLink($post->user_id, $helper->image($avatar, 80)) ?><br />
            <?php endif; ?>
            <?php echo $helper->translate('Dabei seit') ?>: <?php echo $helper->date($post->joined_tstamp) ?><br />
            <?php echo $helper->translate('Beitraege') ?>: <?php echo $post->post_count ?>
        </td>
        <td class="col2">
            <p class="title"><?php echo $post->subject ?></p>
            <p class="message"><?php echo nl2br($post->message) ?></p>
        </td>
    </tr>
    <?php endforeach; ?>
</table>

<?php echo $this->render('_paginator') ?>

<p><a class="button" href="<?php echo $helper->url()->toPage($helper->config('formPid'), array('tx_zboard_pi2' => array('pid' => $helper->page('uid'), 'uid' => $this->topic->uid, 'page' => $this->page))) ?>"><?php echo $helper->translate('Antworten') ?></a></p>
